package com.pipe.servicepipe.controller;


import com.pipe.servicepipe.annotation.OperationAnnotation;
import com.pipe.servicepipe.entity.PipeUser;
import com.pipe.servicepipe.service.PipeUserService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 * 用户表 前端控制器
 * </p>
 *
 * @author hetao
 * @since 2020-07-12
 */
@RestController
@RequestMapping("user")
public class PipeUserController {
    @Resource
    private PipeUserService pipeUserService;

    @PostMapping
    @OperationAnnotation("添加用戶")
    public String saveTest(@RequestBody PipeUser pipeUser) {
        pipeUserService.save(pipeUser);
        return "success";
    }
}

